DRAFT: add 'gene' feature capture when reading genbank files#1435
DRAFT: add 'gene' feature capture when reading genbank files#1435j23414 wants to merge 2 commits into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1435 +/- ##
==========================================
+ Coverage 68.66% 68.70% +0.03%
==========================================
Files 69 69
Lines 7554 7608 +54
Branches 1851 1866 +15
==========================================
+ Hits 5187 5227 +40
- Misses 2089 2098 +9
- Partials 278 283 +5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| if fname and (feature_names is None or fname in feature_names): | ||
| features[fname] = feat | ||
|
|
||
| if feat.type=='gene': |
There was a problem hiding this comment.
To reduce the chances of this introducing unexpected changes to current usage, I'd suggest an approach where we only use 'gene' features if the corresponding 'CDS' feature doesn't exist. There's a few different ways to implement this, but the simplest may be to use an extra loop through gb.features.
There was a problem hiding this comment.
Continuing this discussion based on nextstrain/rsv#55 (comment):
Theoretically CDSs are what we want, but we have GenBank files which use "gene" instead. I can't think of a situation where we want to extract both from the same genbank reference¹. One option is to look for 'gene' only if no CDSs are found. Another is to expose this as a command line argument to augur.
¹ I'm sure there are exceptions to this, in which case I think the onus is on the user to edit the GenBank file upstream of Augur.
There was a problem hiding this comment.
Is this something where we need to poll users to vote for "CDS" or "gene"? Or it sounds like we're pretty sure it's "CDS"?
Another is to expose this as a command line argument to augur.
Ah, I could get behind having a command line argument
There was a problem hiding this comment.
We're sure we want to use CDS, this is what we're moving towards as only CDSes allow complex annotations like ribosomal slippage etc. Nextclade v3 uses CDS moving forward, we've made similar changes for auspice
Description of proposed changes
In response to nextstrain/rsv#55 (comment), adds a 'gene' feature capture when reading GenBank files.
Please feel free to commit changes to this branch, this initial commit was a draft.
We should add a test of some sort to make sure this works as expected, perhaps in augur/tests/io?
The potential benefit of this functionality is to simplify the newreference.py script for Nextstrain gene tree builds.
Related issue(s)
Checklist